home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / doom / turric03.zip / TEXTS / EATGIBS.TXT < prev    next >
Text File  |  1996-10-21  |  5KB  |  157 lines

  1. ==============================================================================
  2. Title                   : Eat Gibs 1.0
  3. Filename                : eatgibs.txt, eatgibs.pat
  4. Author                  : Sean Leonard
  5. Email Address           : leonard@ap.net
  6. Description             : If your health is below 50%, you can eat the
  7.                           gibs of monsters or your opponants to heal you.
  8.                           A normal gib (leg, arm, etc.) will heal you a
  9.                           random amount between 1 and 10 percent.  A head
  10.                           will heal you 15 percent.
  11.  
  12.                           This patch is ESPECIALLY useful and cool if you
  13.                           have Jeff Epler's (jepler@inetnebr.com) solid
  14.                           monster patch so that you can hack up your enemies
  15.                           to eat them!
  16. How to use              : I distributed this file in both plain text and
  17.                           GNU diff format for those who know how to use
  18.                           it.  I assume you know how to compile this and
  19.                           use the modified progs.dat.  If not, ask around
  20.                           on the news groups.  (I'm sure that there'll be
  21.                           a FAQ when the quake-c news group is created)
  22. ==============================================================================
  23. * Play Information *
  24. Level #                 : N/A
  25. Single Player           : Yes
  26. Cooperative 2-16 Player : Yes
  27. Deathmatch 2-16 Player  : Yes
  28. Difficulty Settings     : N/A
  29. New Sounds              : No
  30. New Graphics            : No
  31. New Music               : No
  32. New Weapons        : No
  33. Demos Replaced          : No
  34.  
  35. * Copyright / Permissions *
  36. Give me credit if you use this code or I inspire you =).
  37.  
  38. * Where to get this file *
  39.  
  40. ftp://ftp.cdrom.com/pub/idgames2/quakec/misc/
  41.  
  42. ==============================================================================
  43.  
  44. =-=-=-=-=-=-=-
  45. Key
  46. +    add this
  47. -    remove this
  48. =-=-=-=-=-=-=-
  49.  
  50. PLAYER.QC
  51.  
  52. ************************
  53.      setsize (new, '0 0 0', '0 0 0');
  54.      new.velocity = VelocityForDamage (dm);
  55.      new.movetype = MOVETYPE_BOUNCE;
  56. -    new.solid = SOLID_NOT;
  57. +        new.solid = SOLID_TRIGGER;
  58.      new.avelocity_x = random()*600;
  59.      new.avelocity_y = random()*600;
  60.      new.avelocity_z = random()*600;
  61. @@ -475,6 +475,7 @@
  62.      new.nextthink = time + 10 + random()*10;
  63.      new.frame = 0;
  64.      new.flags = 0;
  65. +        new.touch = EatGibs;
  66.  };
  67. ************************
  68.  
  69. ************************
  70.      self.nextthink = -1;
  71.      self.movetype = MOVETYPE_BOUNCE;
  72.      self.takedamage = DAMAGE_NO;
  73. -    self.solid = SOLID_NOT;
  74. +        self.solid = SOLID_TRIGGER;
  75.      self.view_ofs = '0 0 8';
  76.      setsize (self, '-16 -16 0', '16 16 56');
  77.      self.velocity = VelocityForDamage (dm);
  78.      self.origin_z = self.origin_z - 24;
  79.      self.flags = self.flags - (self.flags & FL_ONGROUND);
  80.      self.avelocity = crandom() * '0 600 0';
  81. +        self.touch = EatHead;
  82.  };
  83. ************************
  84.  
  85. ITEMS.QC
  86.  
  87. ************************
  88.         item.nextthink = time + 120;    // remove after 2 minutes
  89.      item.think = SUB_Remove;
  90.  };
  91. +
  92. +void() EatGibs =
  93. +{
  94. +// only a player can pick it up
  95. +        if (other.classname != "player")
  96. +        return;
  97. +    if (other.health <= 0)
  98. +        return;
  99. +// only eat gibs if desparate
  100. +        if (other.health >= 50)
  101. +                return;
  102. +
  103. +// heal a random amount of 10% health
  104. +        if (!T_Heal(other, random() * 10, 0))
  105. +                return;
  106. +
  107. +        sprint(other, "Yummy gibs!\n");
  108. +
  109. +// gibs touch sound
  110. +    sound(other, CHAN_ITEM, "zombie/z_miss.wav", 1, ATTN_NORM);
  111. +
  112. +        stuffcmd (other, "bf\n");
  113. +
  114. +        remove (self);
  115. +
  116. +};
  117. +
  118. +void() EatHead =
  119. +{
  120. +// only a player can pick it up
  121. +        if (other.classname != "player")
  122. +        return;
  123. +    if (other.health <= 0)
  124. +        return;
  125. +// only eat head if desparate
  126. +        if (other.health >= 50)
  127. +                return;
  128. +
  129. +// heal 15%
  130. +        if (!T_Heal(other, 15, 0))
  131. +                return;
  132. +
  133. +        sprint(other, "Tasty brains!\n");
  134. +
  135. +// head touch sound
  136. +        sound(other, CHAN_ITEM, "demon/dhit2.wav", 1, ATTN_NORM);
  137. +
  138. +        stuffcmd (other, "bf\n");
  139. +
  140. +        remove (self);
  141. +
  142. +};
  143. ************************
  144.  
  145. WORLD.QC
  146.  
  147. ************************
  148.  // setup precaches allways needed
  149. -    precache_sound ("items/itembk2.wav");        // item respawn sound
  150. +        precache_sound ("demon/dhit2.wav");             // for eatin' heads
  151. +        precache_sound ("zombie/z_miss.wav");           // for eatin' gibs
  152. +
  153. +        precache_sound ("items/itembk2.wav");           // item respawn sound
  154.      precache_sound ("player/plyrjmp8.wav");        // player jump
  155.      precache_sound ("player/land.wav");            // player landing
  156.      precache_sound ("player/land2.wav");        // player hurt landing
  157. ************************